<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>  
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <base href="<%=basePath%>">
    <title>青海省高等级公路青通卡电子客服系统</title>
	<link href="<%=request.getContextPath()%>/css/base.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-1.7.1.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath()%>/js/common.js"></script>
	<script type="text/javascript"  src="<%=request.getContextPath()%>/dwr/util.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath()%>/dwr/engine.js"></script>
	<script type='text/javascript' src="<%=request.getContextPath()%>/dwr/interface/LoginDwr.js"></script>
	<script type="text/javascript">
		//回车按钮事件处理  
		$(document).keyup(function(event){
   		 	if(event.keyCode ==13){
     			$("#login").trigger("click");
    	 	 }
     	});
     	$(function() {
        	$('#login').click(function() {
        	$("#msg").html('正在登录系统.....');
        		var operID = $("#operID").val();
				var pwd = $("#pwd").val();
				if (operID=='') {
					 $("#msg").html("请填写工号");
					 $("#operID").focus();
					 return false;
				}
				if (pwd=='') {
					 $("#msg").html("请填写密码");
					  $("#pwd").focus();
					 return false;
				}
			//var sPsamId=Web800.ReadPSAM();
			var sPsamId=10001;
			var pasm = $("#PSAM").val();
		   	var ip = $("#IP").val();
		   	var mac = $("#MAC").val();
		   	var term = $("#Term").val();
				oper=parseInt(operID, 10);
				LoginDwr.operCheck(sPsamId,oper,pwd,ip,term,function(data){
				if(data == "") {
					location.href='<%= request.getContextPath() %>/jsp/MyIndex.jsp';
				}else {
					$('#msg').html(data);
				}
			});
            });
        });
           function closeLogin() {
        	window.close();
        }
	</script>
  </head>
  
  
  <body>
	<div class="login">
  	<h1>青海省高等级公路</h1>
 	<div class="login_box">
 	 <h2>青通卡电子客服系统</h2>
  	<form class="login_form" name="login">
   	<ul>
    		<li class="li1"><input type="text" class="input_text" name="operID"  id="operID"  maxlength="7"  onkeydown="myKeyDownInt()" ondragenter="return false"  /><!--<i class="i_style_1"></i>--></li>
    		<li class="li2"><input type="password" class="input_text" name="pwd"  id="pwd" maxlength="32"  onkeydown="myKeyDownInt()" ondragenter="return false"   /><!--<i class="i_style_1_2"></i>--></li>
   	</ul>
   	<p class="p_form"><a  href="javascript:void(0)" id="login" class="abbtn_login">登录</a><a  onclick="closeLogin()"   href="javascript:void(0)"  id="cancle" class="abbtn_login_2">取消</a></p>
   	<p align="center"><span id="msg" style="color:red;"></span></p>
  	</form>
  	<s:hidden name="posTerm.PSAM" id="PSAM" value="131000000001"></s:hidden>
    <s:hidden name="posTerm.IP" id="IP" value="10.44.111.129"></s:hidden>
    <s:hidden name="posTerm.MAC" id="MAC" value=""></s:hidden>
    <s:hidden name="posTerm.Term" id="Term" value="1"></s:hidden>
	 </div><!-- end of login_box -->
	 </div><!-- end of login -->
</body>
<OBJECT id="Web800" codebase="<%= request.getContextPath() %>/jsp/eagleCardCom.cab"  classid=clsid:FDC10DDD-7FB3-4AC7-993A-B9D3E554E5D4></OBJECT>
</html>
